package com.antler.smt.portal.mapper;

import com.antler.smt.entity.SupplierEntity;
import com.antler.smt.request.admin.GetSupplierListReq;
import com.antler.smt.response.admin.GetSupplierListResp;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *  服务商Mapper
 *
 *  @author zhangyi
 *  @date 2018-03-30 14:15
 */
@Repository
public interface SupplierInfoMapper {

  /**
   * 根据主键id或会员id查询服务商实体
   *
   * @param supplierEntity 服务商实体
   * @return
   */
  GetSupplierListResp selectSupplierByKey(SupplierEntity supplierEntity);

  /**
   *  服务商入驻完善信息
   *
   * @param supplierEntity
   * @return
   */
  int updateSupplierInfo(SupplierEntity supplierEntity);

  /**
   * 条件查询优质加工厂
   *
   * @param request
   * @return
   */
  Page<GetSupplierListResp> selectExcellentSupplier(GetSupplierListReq request);

  /**
   * 根据昵称查询优质加工厂信息
   *
   * @param nickName
   * @return
   */
  Page<GetSupplierListResp> selectExcellentSupplierByNickName(String nickName);

}
